vertical line test for function